package com.ymatou.iapi.rule.service;

import com.ymatou.iapi.optrade.resp.PlaceOrderResp;
import com.ymatou.iapi.rule.parameter.RuleComputeResp;
import com.ymt.base.YmatouBaseCall;
import com.ymt.core.tool.FormatUtil;
import com.ymttest.utils.EnvSetup;
/**
*计算规则Call
*FreeMaker Template自动生成代码
*/
public class ComputeCall extends YmatouBaseCall{
	private static String opurl ="api/rule/compute";
	
	public ComputeCall() {
		super(EnvSetup.getSystemUrl("rule_iapi"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	public RuleComputeResp getData() {
		return (RuleComputeResp) FormatUtil.GSONToObject(getJsonObject().get("data").toString(),
				RuleComputeResp.class);
	}
}